<?php
/**
 * Created by PhpStorm
 * User: shen.zk
 * Date: 2023/10/23
 * Time: 15:17
 * Comment: ''
 */

namespace App\Params\Common;

use App\Params\BaseParam;
class MerchantsInfoCreateParams extends BaseParam
{
    public $access_mid;
    public $apply_for_mid; // 接入商户号
    public $company_name; // 企业全称
    public $user_name;  // 创作者名称
    public $portrait; // 创作者头像
    public $company_int;   // 创作者简介
    public $contact;  // 联系人
    public $contact_phone; // 联系人电话
    public $assort_id;     // 归属领域分类ID
    public $accsplit_mer_no;     // 分账用杉德宝商户号
    public $multipart_rate;     // 分账比例

    public function rules()
    {
        return [
            'apply_for_mid'=> 'required|string',
            'company_name' => 'required|string',
            'user_name'=> 'required|string',
            'portrait' => 'required|string',
            'company_int' => 'required|string',
            'contact' => 'required|string',
            'contact_phone' => 'required|string',
            'assort_id' => 'required|int',
            'accsplit_mer_no' => 'nullable|string',
            'multipart_rate' => 'nullable|string',
        ];
    }

    public function message()
    {
        return [
            'apply_for_mid.required'=>"接⼊商户号不能为空",
            "company_name.required" => "企业名称不能为空",
            "portrait.required" => "头像不能为空",
            "contact.required" => "联系人不能为空",
            "contact_phone.required" => "联系人手机号不能为空",
            "company_int.required" => "创作者简介不能为空",
            "assort_id.required" => "领域分类不能为空",
            "user_name.required" => "创作者名称不能为空",
        ];
    }

    public function getAccsplitMerNo()
    {
        return $this->accsplit_mer_no;
    }

    public function getMultipartRate()
    {
        return $this->multipart_rate;
    }
}
